package org.jcommon.io;

import java.util.HashMap;
import java.util.Map;

public class MimeType {
	private static final Map<String, String> mappings = new HashMap<String, String>();
	static {
    	register("3dm", "x-world/x-3dmf");
    	register("3dmf", "x-world/x-3dmf");
    	register("a", "application/octet-stream");
    	register("aab", "application/x-authorware-bin");
    	register("aam", "application/x-authorware-map");
    	register("aas", "application/x-authorware-seg");
    	register("abc", "text/vnd.abc");
    	register("acgi", "text/html");
    	register("afl", "video/animaflex");
    	register("ai", "application/postscript");
    	register("aif", "audio/aiff");
    	register("aif", "audio/x-aiff");
    	register("aifc", "audio/aiff");
    	register("aifc", "audio/x-aiff");
    	register("aiff", "audio/aiff");
    	register("aiff", "audio/x-aiff");
    	register("aim", "application/x-aim");
    	register("aip", "text/x-audiosoft-intra");
    	register("ani", "application/x-navi-animation");
    	register("aos", "application/x-nokia-9000-communicator-add-on-software");
    	register("aps", "application/mime");
    	register("arc", "application/octet-stream");
    	register("arj", "application/arj");
    	register("arj", "application/octet-stream");
    	register("art", "image/x-jg");
    	register("asf", "video/x-ms-asf");
    	register("asm", "text/x-asm");
    	register("asp", "text/asp");
    	register("asx", "application/x-mplayer2");
    	register("asx", "video/x-ms-asf");
    	register("asx", "video/x-ms-asf-plugin");
    	register("au", "audio/basic");
    	register("au", "audio/x-au");
    	register("avi", "application/x-troff-msvideo");
    	register("avi", "video/avi");
    	register("avi", "video/msvideo");
    	register("avi", "video/x-msvideo");
    	register("avs", "video/avs-video");
    	register("bcpio", "application/x-bcpio");
    	register("bin", "application/mac-binary");
    	register("bin", "application/macbinary");
    	register("bin", "application/octet-stream");
    	register("bin", "application/x-binary");
    	register("bin", "application/x-macbinary");
    	register("bm", "image/bmp");
    	register("bmp", "image/bmp");
    	register("bmp", "image/x-windows-bmp");
    	register("boo", "application/book");
    	register("book", "application/book");
    	register("boz", "application/x-bzip2");
    	register("bsh", "application/x-bsh");
    	register("bz", "application/x-bzip");
    	register("bz2", "application/x-bzip2");
    	register("c", "text/plain");
    	register("c", "text/x-c");
    	register("c++", "text/plain");
    	register("cat", "application/vnd.ms-pki.seccat");
    	register("cc", "text/plain");
    	register("cc", "text/x-c");
    	register("ccad", "application/clariscad");
    	register("cco", "application/x-cocoa");
    	register("cdf", "application/cdf");
    	register("cdf", "application/x-cdf");
    	register("cdf", "application/x-netcdf");
    	register("cer", "application/pkix-cert");
    	register("cer", "application/x-x509-ca-cert");
    	register("cha", "application/x-chat");
    	register("chat", "application/x-chat");
    	register("class", "application/java");
    	register("class", "application/java-byte-code");
    	register("class", "application/x-java-class");
    	register("com", "application/octet-stream");
    	register("com", "text/plain");
    	register("conf", "text/plain");
    	register("cpio", "application/x-cpio");
    	register("cpp", "text/x-c");
    	register("cpt", "application/mac-compactpro");
    	register("cpt", "application/x-compactpro");
    	register("cpt", "application/x-cpt");
    	register("crl", "application/pkcs-crl");
    	register("crl", "application/pkix-crl");
    	register("crt", "application/pkix-cert");
    	register("crt", "application/x-x509-ca-cert");
    	register("crt", "application/x-x509-user-cert");
    	register("csh", "application/x-csh");
    	register("csh", "text/x-script.csh");
    	register("css", "application/x-pointplus");
    	register("css", "text/css");
    	register("cxx", "text/plain");
    	register("dcr", "application/x-director");
    	register("deepv", "application/x-deepv");
    	register("def", "text/plain");
    	register("der", "application/x-x509-ca-cert");
    	register("dif", "video/x-dv");
    	register("dir", "application/x-director");
    	register("dl", "video/dl");
    	register("dl", "video/x-dl");
    	register("doc", "application/msword");
    	register("dot", "application/msword");
    	register("dp", "application/commonground");
    	register("drw", "application/drafting");
    	register("dump", "application/octet-stream");
    	register("dv", "video/x-dv");
    	register("dvi", "application/x-dvi");
    	register("dwf", "drawing/x-dwf (old)");
    	register("dwf", "model/vnd.dwf");
    	register("dwg", "application/acad");
    	register("dwg", "image/vnd.dwg");
    	register("dwg", "image/x-dwg");
    	register("dxf", "application/dxf");
    	register("dxf", "image/vnd.dwg");
    	register("dxf", "image/x-dwg");
    	register("dxr", "application/x-director");
    	register("el", "text/x-script.elisp");
    	register("elc", "application/x-bytecode.elisp (compiled elisp)");
    	register("elc", "application/x-elc");
    	register("env", "application/x-envoy");
    	register("eps", "application/postscript");
    	register("es", "application/x-esrehber");
    	register("etx", "text/x-setext");
    	register("evy", "application/envoy");
    	register("evy", "application/x-envoy");
    	register("exe", "application/octet-stream");
    	register("f", "text/plain");
    	register("f", "text/x-fortran");
    	register("f77", "text/x-fortran");
    	register("f90", "text/plain");
    	register("f90", "text/x-fortran");
    	register("fdf", "application/vnd.fdf");
    	register("fif", "application/fractals");
    	register("fif", "image/fif");
    	register("fli", "video/fli");
    	register("fli", "video/x-fli");
    	register("flo", "image/florian");
    	register("flx", "text/vnd.fmi.flexstor");
    	register("fmf", "video/x-atomic3d-feature");
    	register("for", "text/plain");
    	register("for", "text/x-fortran");
    	register("fpx", "image/vnd.fpx");
    	register("fpx", "image/vnd.net-fpx");
    	register("frl", "application/freeloader");
    	register("funk", "audio/make");
    	register("g", "text/plain");
    	register("g3", "image/g3fax");
    	register("gif", "image/gif");
    	register("gl", "video/gl");
    	register("gl", "video/x-gl");
    	register("gsd", "audio/x-gsm");
    	register("gsm", "audio/x-gsm");
    	register("gsp", "application/x-gsp");
    	register("gss", "application/x-gss");
    	register("gtar", "application/x-gtar");
    	register("gz", "application/x-compressed");
    	register("gz", "application/x-gzip");
    	register("gzip", "application/x-gzip");
    	register("gzip", "multipart/x-gzip");
    	register("h", "text/plain");
    	register("h", "text/x-h");
    	register("hdf", "application/x-hdf");
    	register("help", "application/x-helpfile");
    	register("hgl", "application/vnd.hp-hpgl");
    	register("hh", "text/plain");
    	register("hh", "text/x-h");
    	register("hlb", "text/x-script");
    	register("hlp", "application/hlp");
    	register("hlp", "application/x-helpfile");
    	register("hlp", "application/x-winhelp");
    	register("hpg", "application/vnd.hp-hpgl");
    	register("hpgl", "application/vnd.hp-hpgl");
    	register("hqx", "application/binhex");
    	register("hqx", "application/binhex4");
    	register("hqx", "application/mac-binhex");
    	register("hqx", "application/mac-binhex40");
    	register("hqx", "application/x-binhex40");
    	register("hqx", "application/x-mac-binhex40");
    	register("hta", "application/hta");
    	register("htc", "text/x-component");
    	register("htm", "text/html");
    	register("html", "text/html");
    	register("htmls", "text/html");
    	register("htt", "text/webviewhtml");
    	register("htx", "text/html");
    	register("ice", "x-conference/x-cooltalk");
    	register("ico", "image/x-icon");
    	register("idc", "text/plain");
    	register("ief", "image/ief");
    	register("iefs", "image/ief");
    	register("iges", "application/iges");
    	register("iges", "model/iges");
    	register("igs", "application/iges");
    	register("igs", "model/iges");
    	register("ima", "application/x-ima");
    	register("imap", "application/x-httpd-imap");
    	register("inf", "application/inf");
    	register("ins", "application/x-internett-signup");
    	register("ip", "application/x-ip2");
    	register("isu", "video/x-isvideo");
    	register("it", "audio/it");
    	register("iv", "application/x-inventor");
    	register("ivr", "i-world/i-vrml");
    	register("ivy", "application/x-livescreen");
    	register("jam", "audio/x-jam");
    	register("jav", "text/plain");
    	register("jav", "text/x-java-source");
    	register("java", "text/plain");
    	register("java", "text/x-java-source");
    	register("jcm", "application/x-java-commerce");
    	register("jfif", "image/jpeg");
    	register("jfif", "image/pjpeg");
    	register("jfif-tbnl", "image/jpeg");
    	register("jpe", "image/jpeg");
    	register("jpe", "image/pjpeg");
    	register("jpeg", "image/jpeg");
    	register("jpeg", "image/pjpeg");
    	register("jpg", "image/jpeg");
    	register("jpg", "image/pjpeg");
    	register("jps", "image/x-jps");
    	register("js", "application/x-javascript");
    	register("jut", "image/jutvision");
    	register("kar", "audio/midi");
    	register("kar", "music/x-karaoke");
    	register("ksh", "application/x-ksh");
    	register("ksh", "text/x-script.ksh");
    	register("la", "audio/nspaudio");
    	register("la", "audio/x-nspaudio");
    	register("lam", "audio/x-liveaudio");
    	register("latex", "application/x-latex");
    	register("lha", "application/lha");
    	register("lha", "application/octet-stream");
    	register("lha", "application/x-lha");
    	register("lhx", "application/octet-stream");
    	register("list", "text/plain");
    	register("lma", "audio/nspaudio");
    	register("lma", "audio/x-nspaudio");
    	register("log", "text/plain");
    	register("lsp", "application/x-lisp");
    	register("lsp", "text/x-script.lisp");
    	register("lst", "text/plain");
    	register("lsx", "text/x-la-asf");
    	register("ltx", "application/x-latex");
    	register("lzh", "application/octet-stream");
    	register("lzh", "application/x-lzh");
    	register("lzx", "application/lzx");
    	register("lzx", "application/octet-stream");
    	register("lzx", "application/x-lzx");
    	register("m", "text/plain");
    	register("m", "text/x-m");
    	register("m1v", "video/mpeg");
    	register("m2a", "audio/mpeg");
    	register("m2v", "video/mpeg");
    	register("m3u", "audio/x-mpequrl");
    	register("man", "application/x-troff-man");
    	register("map", "application/x-navimap");
    	register("mar", "text/plain");
    	register("mbd", "application/mbedlet");
    	register("mc$", "application/x-magic-cap-package-1.0");
    	register("mcd", "application/mcad");
    	register("mcd", "application/x-mathcad");
    	register("mcf", "image/vasa");
    	register("mcf", "text/mcf");
    	register("mcp", "application/netmc");
    	register("me", "application/x-troff-me");
    	register("mht", "message/rfc822");
    	register("mhtml", "message/rfc822");
    	register("mid", "application/x-midi");
    	register("mid", "audio/midi");
    	register("mid", "audio/x-mid");
    	register("mid", "audio/x-midi");
    	register("mid", "music/crescendo");
    	register("mid", "x-music/x-midi");
    	register("midi", "application/x-midi");
    	register("midi", "audio/midi");
    	register("midi", "audio/x-mid");
    	register("midi", "audio/x-midi");
    	register("midi", "music/crescendo");
    	register("midi", "x-music/x-midi");
    	register("mif", "application/x-frame");
    	register("mif", "application/x-mif");
    	register("mime", "message/rfc822");
    	register("mime", "www/mime");
    	register("mjf", "audio/x-vnd.audioexplosion.mjuicemediafile");
    	register("mjpg", "video/x-motion-jpeg");
    	register("mm", "application/base64");
    	register("mm", "application/x-meme");
    	register("mme", "application/base64");
    	register("mod", "audio/mod");
    	register("mod", "audio/x-mod");
    	register("moov", "video/quicktime");
    	register("mov", "video/quicktime");
    	register("movie", "video/x-sgi-movie");
    	register("mp2", "audio/mpeg");
    	register("mp2", "audio/x-mpeg");
    	register("mp2", "video/mpeg");
    	register("mp2", "video/x-mpeg");
    	register("mp2", "video/x-mpeq2a");
    	register("mp3", "audio/mpeg3");
    	register("mp3", "audio/x-mpeg-3");
    	register("mp3", "video/mpeg");
    	register("mp3", "video/x-mpeg");
    	register("mpa", "audio/mpeg");
    	register("mpa", "video/mpeg");
    	register("mpc", "application/x-project");
    	register("mpe", "video/mpeg");
    	register("mpeg", "video/mpeg");
    	register("mpg", "audio/mpeg");
    	register("mpg", "video/mpeg");
    	register("mpga", "audio/mpeg");
    	register("mpp", "application/vnd.ms-project");
    	register("mpt", "application/x-project");
    	register("mpv", "application/x-project");
    	register("mpx", "application/x-project");
    	register("mrc", "application/marc");
    	register("ms", "application/x-troff-ms");
    	register("mv", "video/x-sgi-movie");
    	register("my", "audio/make");
    	register("mzz", "application/x-vnd.audioexplosion.mzz");
    	register("nap", "image/naplps");
    	register("naplps", "image/naplps");
    	register("nc", "application/x-netcdf");
    	register("ncm", "application/vnd.nokia.configuration-message");
    	register("nif", "image/x-niff");
    	register("niff", "image/x-niff");
    	register("nix", "application/x-mix-transfer");
    	register("nsc", "application/x-conference");
    	register("nvd", "application/x-navidoc");
    	register("o", "application/octet-stream");
    	register("oda", "application/oda");
    	register("omc", "application/x-omc");
    	register("omcd", "application/x-omcdatamaker");
    	register("omcr", "application/x-omcregerator");
    	register("p", "text/x-pascal");
    	register("p10", "application/pkcs10");
    	register("p10", "application/x-pkcs10");
    	register("p12", "application/pkcs-12");
    	register("p12", "application/x-pkcs12");
    	register("p7a", "application/x-pkcs7-signature");
    	register("p7c", "application/pkcs7-mime");
    	register("p7c", "application/x-pkcs7-mime");
    	register("p7m", "application/pkcs7-mime");
    	register("p7m", "application/x-pkcs7-mime");
    	register("p7r", "application/x-pkcs7-certreqresp");
    	register("p7s", "application/pkcs7-signature");
    	register("part", "application/pro_eng");
    	register("pas", "text/pascal");
    	register("pbm", "image/x-portable-bitmap");
    	register("pcl", "application/vnd.hp-pcl");
    	register("pcl", "application/x-pcl");
    	register("pct", "image/x-pict");
    	register("pcx", "image/x-pcx");
    	register("pdb", "chemical/x-pdb");
    	register("pdf", "application/pdf");
    	register("pfunk", "audio/make");
    	register("pfunk", "audio/make.my.funk");
    	register("pgm", "image/x-portable-graymap");
    	register("pgm", "image/x-portable-greymap");
    	register("pic", "image/pict");
    	register("pict", "image/pict");
    	register("pkg", "application/x-newton-compatible-pkg");
    	register("pko", "application/vnd.ms-pki.pko");
    	register("pl", "text/plain");
    	register("pl", "text/x-script.perl");
    	register("plx", "application/x-pixclscript");
    	register("pm", "image/x-xpixmap");
    	register("pm", "text/x-script.perl-module");
    	register("pm4", "application/x-pagemaker");
    	register("pm5", "application/x-pagemaker");
    	register("png", "image/png");
    	register("pnm", "application/x-portable-anymap");
    	register("pnm", "image/x-portable-anymap");
    	register("pot", "application/mspowerpoint");
    	register("pot", "application/vnd.ms-powerpoint");
    	register("pov", "model/x-pov");
    	register("ppa", "application/vnd.ms-powerpoint");
    	register("ppm", "image/x-portable-pixmap");
    	register("pps", "application/mspowerpoint");
    	register("pps", "application/vnd.ms-powerpoint");
    	register("ppt", "application/mspowerpoint");
    	register("ppt", "application/powerpoint");
    	register("ppt", "application/vnd.ms-powerpoint");
    	register("ppt", "application/x-mspowerpoint");
    	register("ppz", "application/mspowerpoint");
    	register("pre", "application/x-freelance");
    	register("prt", "application/pro_eng");
    	register("ps", "application/postscript");
    	register("psd", "application/octet-stream");
    	register("pvu", "paleovu/x-pv");
    	register("pwz", "application/vnd.ms-powerpoint");
    	register("py", "text/x-script.phyton");
    	register("pyc", "applicaiton/x-bytecode.python");
    	register("qcp", "audio/vnd.qcelp");
    	register("qd3", "x-world/x-3dmf");
    	register("qd3d", "x-world/x-3dmf");
    	register("qif", "image/x-quicktime");
    	register("qt", "video/quicktime");
    	register("qtc", "video/x-qtc");
    	register("qti", "image/x-quicktime");
    	register("qtif", "image/x-quicktime");
    	register("ra", "audio/x-pn-realaudio");
    	register("ra", "audio/x-pn-realaudio-plugin");
    	register("ra", "audio/x-realaudio");
    	register("ram", "audio/x-pn-realaudio");
    	register("ras", "application/x-cmu-raster");
    	register("ras", "image/cmu-raster");
    	register("ras", "image/x-cmu-raster");
    	register("rast", "image/cmu-raster");
    	register("rexx", "text/x-script.rexx");
    	register("rf", "image/vnd.rn-realflash");
    	register("rgb", "image/x-rgb");
    	register("rm", "application/vnd.rn-realmedia");
    	register("rm", "audio/x-pn-realaudio");
    	register("rmi", "audio/mid");
    	register("rmm", "audio/x-pn-realaudio");
    	register("rmp", "audio/x-pn-realaudio");
    	register("rmp", "audio/x-pn-realaudio-plugin");
    	register("rng", "application/ringing-tones");
    	register("rng", "application/vnd.nokia.ringing-tone");
    	register("rnx", "application/vnd.rn-realplayer");
    	register("roff", "application/x-troff");
    	register("rp", "image/vnd.rn-realpix");
    	register("rpm", "audio/x-pn-realaudio-plugin");
    	register("rt", "text/richtext");
    	register("rt", "text/vnd.rn-realtext");
    	register("rtf", "application/rtf");
    	register("rtf", "application/x-rtf");
    	register("rtf", "text/richtext");
    	register("rtx", "application/rtf");
    	register("rtx", "text/richtext");
    	register("rv", "video/vnd.rn-realvideo");
    	register("s", "text/x-asm");
    	register("s3m", "audio/s3m");
    	register("saveme", "application/octet-stream");
    	register("sbk", "application/x-tbook");
    	register("scm", "application/x-lotusscreencam");
    	register("scm", "text/x-script.guile");
    	register("scm", "text/x-script.scheme");
    	register("scm", "video/x-scm");
    	register("sdml", "text/plain");
    	register("sdp", "application/sdp");
    	register("sdp", "application/x-sdp");
    	register("sdr", "application/sounder");
    	register("sea", "application/sea");
    	register("sea", "application/x-sea");
    	register("set", "application/set");
    	register("sgm", "text/sgml");
    	register("sgm", "text/x-sgml");
    	register("sgml", "text/sgml");
    	register("sgml", "text/x-sgml");
    	register("sh", "application/x-bsh");
    	register("sh", "application/x-sh");
    	register("sh", "application/x-shar");
    	register("sh", "text/x-script.sh");
    	register("shar", "application/x-bsh");
    	register("shar", "application/x-shar");
    	register("shtml", "text/html");
    	register("shtml", "text/x-server-parsed-html");
    	register("sid", "audio/x-psid");
    	register("sit", "application/x-sit");
    	register("sit", "application/x-stuffit");
    	register("skd", "application/x-koan");
    	register("skm", "application/x-koan");
    	register("skp", "application/x-koan");
    	register("skt", "application/x-koan");
    	register("sl", "application/x-seelogo");
    	register("smi", "application/smil");
    	register("smil", "application/smil");
    	register("snd", "audio/basic");
    	register("snd", "audio/x-adpcm");
    	register("sol", "application/solids");
    	register("spc", "application/x-pkcs7-certificates");
    	register("spc", "text/x-speech");
    	register("spl", "application/futuresplash");
    	register("spr", "application/x-sprite");
    	register("sprite", "application/x-sprite");
    	register("src", "application/x-wais-source");
    	register("ssi", "text/x-server-parsed-html");
    	register("ssm", "application/streamingmedia");
    	register("sst", "application/vnd.ms-pki.certstore");
    	register("step", "application/step");
    	register("stl", "application/sla");
    	register("stl", "application/vnd.ms-pki.stl");
    	register("stl", "application/x-navistyle");
    	register("stp", "application/step");
    	register("sv4cpio", "application/x-sv4cpio");
    	register("sv4crc", "application/x-sv4crc");
    	register("svf", "image/vnd.dwg");
    	register("svf", "image/x-dwg");
    	register("svr", "application/x-world");
    	register("svr", "x-world/x-svr");
    	register("swf", "application/x-shockwave-flash");
    	register("t", "application/x-troff");
    	register("talk", "text/x-speech");
    	register("tar", "application/x-tar");
    	register("tbk", "application/toolbook");
    	register("tbk", "application/x-tbook");
    	register("tcl", "application/x-tcl");
    	register("tcl", "text/x-script.tcl");
    	register("tcsh", "text/x-script.tcsh");
    	register("tex", "application/x-tex");
    	register("texi", "application/x-texinfo");
    	register("texinfo", "application/x-texinfo");
    	register("text", "application/plain");
    	register("text", "text/plain");
    	register("tgz", "application/gnutar");
    	register("tgz", "application/x-compressed");
    	register("tif", "image/tiff");
    	register("tif", "image/x-tiff");
    	register("tiff", "image/tiff");
    	register("tiff", "image/x-tiff");
    	register("tr", "application/x-troff");
    	register("tsi", "audio/tsp-audio");
    	register("tsp", "application/dsptype");
    	register("tsp", "audio/tsplayer");
    	register("tsv", "text/tab-separated-values");
    	register("turbot", "image/florian");
    	register("txt", "text/plain");
    	register("uil", "text/x-uil");
    	register("uni", "text/uri-list");
    	register("unis", "text/uri-list");
    	register("unv", "application/i-deas");
    	register("uri", "text/uri-list");
    	register("uris", "text/uri-list");
    	register("ustar", "application/x-ustar");
    	register("ustar", "multipart/x-ustar");
    	register("uu", "application/octet-stream");
    	register("uu", "text/x-uuencode");
    	register("uue", "text/x-uuencode");
    	register("vcd", "application/x-cdlink");
    	register("vcs", "text/x-vcalendar");
    	register("vda", "application/vda");
    	register("vdo", "video/vdo");
    	register("vew", "application/groupwise");
    	register("viv", "video/vivo");
    	register("viv", "video/vnd.vivo");
    	register("vivo", "video/vivo");
    	register("vivo", "video/vnd.vivo");
    	register("vmd", "application/vocaltec-media-desc");
    	register("vmf", "application/vocaltec-media-file");
    	register("voc", "audio/voc");
    	register("voc", "audio/x-voc");
    	register("vos", "video/vosaic");
    	register("vox", "audio/voxware");
    	register("vqe", "audio/x-twinvq-plugin");
    	register("vqf", "audio/x-twinvq");
    	register("vql", "audio/x-twinvq-plugin");
    	register("vrml", "application/x-vrml");
    	register("vrml", "model/vrml");
    	register("vrml", "x-world/x-vrml");
    	register("vrt", "x-world/x-vrt");
    	register("vsd", "application/x-visio");
    	register("vst", "application/x-visio");
    	register("vsw", "application/x-visio");
    	register("w60", "application/wordperfect6.0");
    	register("w61", "application/wordperfect6.1");
    	register("w6w", "application/msword");
    	register("wav", "audio/wav");
    	register("wav", "audio/x-wav");
    	register("wb1", "application/x-qpro");
    	register("wbmp", "image/vnd.wap.wbmp");
    	register("web", "application/vnd.xara");
    	register("wiz", "application/msword");
    	register("wk1", "application/x-123");
    	register("wmf", "windows/metafile");
    	register("wml", "text/vnd.wap.wml");
    	register("wmlc", "application/vnd.wap.wmlc");
    	register("wmls", "text/vnd.wap.wmlscript");
    	register("wmlsc", "application/vnd.wap.wmlscriptc");
    	register("word", "application/msword");
    	register("wp", "application/wordperfect");
    	register("wp5", "application/wordperfect");
    	register("wp5", "application/wordperfect6.0");
    	register("wp6", "application/wordperfect");
    	register("wpd", "application/wordperfect");
    	register("wpd", "application/x-wpwin");
    	register("wq1", "application/x-lotus");
    	register("wri", "application/mswrite");
    	register("wri", "application/x-wri");
    	register("wrl", "application/x-world");
    	register("wrl", "model/vrml");
    	register("wrl", "x-world/x-vrml");
    	register("wrz", "model/vrml");
    	register("wrz", "x-world/x-vrml");
    	register("wsc", "text/scriplet");
    	register("wsrc", "application/x-wais-source");
    	register("wtk", "application/x-wintalk");
    	register("xbm", "image/x-xbitmap");
    	register("xbm", "image/x-xbm");
    	register("xbm", "image/xbm");
    	register("xdr", "video/x-amt-demorun");
    	register("xgz", "xgl/drawing");
    	register("xif", "image/vnd.xiff");
    	register("xl", "application/excel");
    	register("xla", "application/excel");
    	register("xla", "application/x-excel");
    	register("xla", "application/x-msexcel");
    	register("xlb", "application/excel");
    	register("xlb", "application/vnd.ms-excel");
    	register("xlb", "application/x-excel");
    	register("xlc", "application/excel");
    	register("xlc", "application/vnd.ms-excel");
    	register("xlc", "application/x-excel");
    	register("xld", "application/excel");
    	register("xld", "application/x-excel");
    	register("xlk", "application/excel");
    	register("xlk", "application/x-excel");
    	register("xll", "application/excel");
    	register("xll", "application/vnd.ms-excel");
    	register("xll", "application/x-excel");
    	register("xlm", "application/excel");
    	register("xlm", "application/vnd.ms-excel");
    	register("xlm", "application/x-excel");
    	register("xls", "application/excel");
    	register("xls", "application/vnd.ms-excel");
    	register("xls", "application/x-excel");
    	register("xls", "application/x-msexcel");
    	register("xlt", "application/excel");
    	register("xlt", "application/x-excel");
    	register("xlv", "application/excel");
    	register("xlv", "application/x-excel");
    	register("xlw", "application/excel");
    	register("xlw", "application/vnd.ms-excel");
    	register("xlw", "application/x-excel");
    	register("xlw", "application/x-msexcel");
    	register("xm", "audio/xm");
    	register("xml", "application/xml");
    	register("xml", "text/xml");
    	register("xmz", "xgl/movie");
    	register("xpix", "application/x-vnd.ls-xpix");
    	register("xpm", "image/x-xpixmap");
    	register("xpm", "image/xpm");
    	register("x-png", "image/png");
    	register("xsr", "video/x-amt-showrun");
    	register("xwd", "image/x-xwd");
    	register("xwd", "image/x-xwindowdump");
    	register("xyz", "chemical/x-pdb");
    	register("z", "application/x-compress");
    	register("z", "application/x-compressed");
    	register("zip", "application/x-compressed");
    	register("zip", "application/x-zip-compressed");
    	register("zip", "application/zip");
    	register("zip", "multipart/x-zip");
    	register("zoo", "application/octet-stream");
    	register("zsh", "text/x-script.zsh");
	}
	
	private static final void register(String extension, String mimeType) {
		mappings.put(extension, mimeType);
	}
	
	public static final String getType(String extension) {
		if (extension.startsWith(".")) {
			extension = extension.substring(1);
		}
		return mappings.get(extension);
	}
	
	public static final String getExtension(String mimeType) {
		for (Map.Entry<String, String> entry : mappings.entrySet()) {
			if (entry.getValue().equals(mimeType)) {
				return entry.getKey();
			}
		}
		return null;
	}
}